package com.shchuangzhi.smartguard.fragment;


import android.app.FragmentTransaction;
import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.shchuangzhi.smartguard.R;
import com.shchuangzhi.smartguard.core.Consts;

/**
 * A simple {@link Fragment} subclass.
 */
public class Terminal extends Fragment implements FragmentNamed{


    public Terminal() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_terminal, container, false);
        FragmentTransaction tx = getFragmentManager().beginTransaction();
        tx.replace(R.id.fragment_current_show, new MainOp());
        tx.replace(R.id.fragment_inout_list, new InOut());
        tx.replace(R.id.fragment_buttons, new StateButton());
        tx.commit();
        return view;
    }

    @Override
    public String Name() {
        return Consts.TERMINAL_FRAGMENT_NAME;
    }

    @Override
    public Fragment Fragment() {
        return this;
    }

}
